import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysPermissionService } from './sys_permission.service';
import { CreateSysPermissionDto } from './dto/create-sys_permission.dto';
import { UpdateSysPermissionDto } from './dto/update-sys_permission.dto';

@Controller('sys-permission')
export class SysPermissionController {
  constructor(private readonly sysPermissionService: SysPermissionService) {}

  @Post()
  create(@Body() createSysPermissionDto: CreateSysPermissionDto) {
    return this.sysPermissionService.create(createSysPermissionDto);
  }

  @Get()
  findAll() {
    return this.sysPermissionService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysPermissionService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysPermissionDto: UpdateSysPermissionDto) {
    return this.sysPermissionService.update(id, updateSysPermissionDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysPermissionService.remove(id);
  }
}
